package zigzag.designpattern.mediator;

import java.awt.event.ActionListener;
import javax.swing.JButton;

public class BtnStop extends JButton implements Command {
    Mediator med;
    BtnStop(ActionListener al, Mediator m) {
        super("Stop");
        addActionListener(al);
        med = m;
        med.registerStop(this);
    }
    public void execute() {
       med.stop();
    }
}

